package string;

import org.junit.Test;

/**
 * @author hubert
 * @date 2019/2/21
 * @description StringTest3
 */
public class StringTest3 {

    @Test
    public void test1() {
        String num_connections = "20";
        String localFileDir = "local";
        String ftpAddress = "ftp";
        //String axelCmd = String.format("axel -n %s -a -o %s %s", new Object[]{num_connections, localFileDir, ftpAddress});

        String axelCmd = String.format("axel -n %s -a -o %s %s", num_connections, localFileDir, ftpAddress);


        System.out.println(axelCmd);

        System.out.println(new String[]{"/bin/sh", "-c", axelCmd});

        System.out.println(String.format("%s|%s", "fileName", "line"));
    }
}
